<?php
declare (strict_types = 1);

namespace app\admin\listener;

class OrderEvent
{
    /**
     * 事件监听处理
     *
     * @return mixed
     */
    public function handle($event)
    {
        if(isset($event['event_type']) && $event['event_type'] == 'send_message'){
            $data['uid']=$event['uid'];
            $data['message']=[
                'type'=>$event['type'],
                'message'=>$event['message']
            ];
            app('SendMessage')->sendMsg($data);
        }
    }
}
